/**
 * 风险评估字典条目规则表管理初始化
 */
var DocCase = {
    id: "DocCaseTable",	//表格id
    seItem: null,		//选中的条目
    table: null,
    layerIndex: -1,
    depType: "科室",
};

/**
 * 初始化表格的列
 */
DocCase.initColumn = function () {
    return [
        {visible: false},
        {title: '主管医师', field: 'docName', align: 'left', width: "20%", valign: 'middle'},
        {title: '病种名称', field: 'drgName', align: 'left', width: "30%", valign: 'middle'},
        {title: '入组例数', field: 'inCaseCount', align: 'left', width: "10%", valign: 'middle'},
        {title: '质控例数', field: 'qcCaseCount', align: 'left', width: "10%", valign: 'middle'},
        {title: '质控人次', field: 'qcCaseTri', align: 'left', width: "10%", valign: 'middle'},
        {title: '平均在院天数', field: 'averageDays', align: 'left', width: "20%", valign: 'middle'}
    ];
};


/**
 * 查询病例
 */
DocCase.search = function () {

    var queryData = {};
    queryData['doctor'] = $("#doctor").val();
    DocCase.table.refresh({query: queryData,pageNumber: 1});

}

DocCase.reset = function () {

    $("#doctor").val('');
    var queryData = {};
    queryData['doctor'] = '';
    DocCase.table.refresh({query: queryData,pageNumber: 1});

}

$(function () {
    //列名称
    var defaultColunms = DocCase.initColumn();
    var table = new BSTable(DocCase.id, Sys.backendPath + "/analysis/qcportal/selectDocDetail", defaultColunms);
    table.setPaginationType("client");
    table.setShowColumns(false);
    table.setShowRefresh(false);
    table.setPageSize(10);
    //table.setPageList([15,30,50,100]);
    table.setShowToggle(false);
    table.setShowExport(false);
    /*table.setFixedColumns(true);//是否固定列
    table.setFixedNumber(4);//固定前几列*/
    table.setSubHeight(-27);
    DocCase.table = table.init();

});
